package com.buer.storage.business.dao;


import com.buer.storage.business.domain.Stock;
import com.buer.storage.business.domain.Worderdetails;
import com.buer.storage.business.dto.PutStorageAllDto;
import com.buer.storage.business.dto.PutStorageDto;
import com.buer.storage.business.dto.WorderDto;
import com.buer.storage.business.dto.WorderdetailsDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WorderDao {

    //订单入库
    int insertOrder(PutStorageDto putStorageDto);

    //商品入库
    int insertDetails(@Param(value = "arrary") Worderdetails[] putProds);

    //查询订单表
    List<WorderDto> findOrderAll();


    //根据订单id删除商品信息
    int deletePutStorageById(int putId);

    //根据商品表id删除商品信息
    int deleteWorderdetails(int detailsId);


    void deleteWorderByPutId(Integer putId);

    void deleteWorderDetailsByPutId(Integer putId);


    int updateAddSumStock(Stock stock);

    void insertStock(WorderdetailsDto putProd);


    Stock queryBuerStockByParam(WorderdetailsDto putProd);

    //查询入库表
    List<PutStorageAllDto> findPutAll(Integer putId);

    WorderdetailsDto[] findOrderDetailInfoByPutId(Integer putId);

    WorderdetailsDto[] findWordertailsAll(Integer putId);

    int updateWorderStatus(Integer putId);
}
